export interface ResponseData {
  code: number
  message: string
  ok: boolean
}

export interface User {
  id?: number
  createTime?: string
  updateTime?: string
  username: string
  password: string
  name: string
  phone?: null | number | string
  roleName?: string
}

export type Records = User[]

export interface UserData {
  records: User[]
  total: number
  size: number
  current: number
  orders: any
  optimizeCountSql: boolean
  hitCount: boolean
  countId: null | number
  maxLimit: null | number
  searchCount: boolean
  pages: number
}

export interface UserResponseData extends ResponseData {
  data: UserData
}

export interface AssginRolesParams {
  roleIdList: number[]
  userId: number
}

export interface Role {
  id: number
  createTime: string
  updateTime: string
  roleName: string
  remark: null | string
}

export interface ResponseGetAllRoles extends ResponseData {
  data: {
    assignRoles: Role[]
    allRolesList: Role[]
  }
}
